<div>
<#if ctrl.render??>
${ctrl.render.code}
<#else>
    <div v-if="filterFields.length > 0" class="filter-group">
        <filter-tree :datas="filterItems" :fields="filterFields">
            <template slot-scope="{ data }">
                <#if ctrl.getPSSearchBarFilters()??>
                <#list ctrl.getPSSearchBarFilters() as filter>
                <template v-if="Object.is(data.editor, '${filter.getName()}')">
                    ${P.getEditorCode(filter, "EDITOR.vue").code}
                </template>
                </#list>
                </#if>
            </template>
        </filter-tree>
    </div>
    <div class="search-bar-footer">
        <#--  <#if !view.isEnableQuickSearch() && ctrl.getQuickSearchMode() gt 0>
        <i-input v-model="query" placeholder="<#if ctrl.getPSSearchBarQuickSearchs()??><#list ctrl.getPSSearchBarQuickSearchs() as search><#if search_index gt 0>,</#if><#if search.getPSDEField()??>${search.getPSDEField().getLogicName()}</#if></#list></#if>" style="<#if ctrl.getQuickSearchWidth() gt 0>width: ${ctrl.getQuickSearchWidth()?c}px;</#if>"></i-input>
        </#if>  -->
        <div class="search-bar-action">
            <el-select size="small" v-if="historyItems.length > 0" v-model="selectItem" @change="onFilterChange.apply(_self, arguments)">
                <el-option v-for="item in historyItems" :key="item.value" :label="item.name" :value="item.value"></el-option>
            </el-select>
            <i-button type="primary" @click="onSearch.apply(_self, arguments)">{{ $t('app.searchButton.search') }}</i-button>
            <i-button @click="onReset.apply(_self, arguments)">{{ $t('app.searchButton.reset') }}</i-button>
            <Poptip ref="propip" trigger="hover" transfer placement="top-end" :title="$t('app.searchForm.custom')" :width="250" @on-popper-show="openPoper.apply(_self, arguments)">
                <i-button><i class="fa fa-floppy-o" aria-hidden="true"></i></i-button>
                <template slot="content">
                    <div>
                        <i-input v-model="saveItemName" :placeholder="$t('app.searchForm.title')"></i-input>
                        <div class="save-action">
                            <i-button @click="onCancel.apply(_self, arguments)">{{ $t('app.commonWords.cancel') }}</i-button>
                            <i-button type="primary" @click="onOk.apply(_self, arguments)">{{ $t('app.commonWords.save') }}</i-button>
                        </div>
                    </div>
                </template>
            </Poptip>
        </div>
    </div>
</#if>
</div>